import * as THREE from 'three';

const geometry = new THREE.BoxGeometry(20, 20, 20);
const material = new THREE.MeshLambertMaterial({ color: 0x00ffff })
const mesh1 = new THREE.Mesh(geometry, material);
const mesh2 = new THREE.Mesh(geometry, material);
mesh2.translateX(25)

const group = new THREE.Group();
group.add(mesh1);
group.add(mesh2);
// 移除
// group.remove(mesh1)

// 影藏和显示（也可以作用于材质对象上）
// mesh1.visible = false;
// material.visible = false;
mesh1.material.visible = false; // 网格模型1和2，共享材质，所以其中一个的材质visible，另一个也受影响


console.log('group', group.children);

export default group;